.photo-grid {
  display: grid;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 16px;
  max-width: 1184px;
  /*max-height: 670px;*/
  margin: 90px auto 0;
  padding: 0;
  border: 0;
 }

@media screen and (max-width: 767px) {
  .photo-grid {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    max-height: min-content;
    gap: 12px;
    margin: 64px auto 0;
  }
}

/*@media screen and (min-width: 426px) and (max-width: 767px) {
  .photo-grid {
    width: 90%;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(6, 1fr);
    max-height: min-content;
    margin: 64px auto 0;
  }
}*/

@media screen and (min-width: 768px) and (max-width: 1023px) {
  .photo-grid {
    min-width: 720px;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(6, 1fr);
    /*grid-template-columns: repeat(2, 352px);
    grid-template-rows: repeat(6, 264px);*/
    max-height: min-content;
    margin: 88px auto 0;
    padding: 0 24px;
    }
}

@media screen and (min-width: 1024px) and (max-width: 1279px) {
  .photo-grid {
    /*min-width: 928px; было и гриды занимали всю ширину экрана*/
    width: 91%;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    max-height: min-content;
    margin: 88px auto 0;
    }
}


/*@media screen and (min-width: 1024px) and (max-width: 1279px) {
  .photo-grid {
    min-width: 928px;
    grid-template-columns: repeat(3, 300px);
    grid-template-rows: repeat(4, 225px);
    max-height: min-content;
    margin: 88px auto 0;
    }
}
*/
